<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>银行卡管理 - 帐号设置 - 用户中心</title>
  {include file="public/css"}
</head>
<body>

<!-- 头部开始 -->
{include file="public/header"}
<!-- 头部结束 -->


<div class="layui-main fly-marginTop fly-user-main ">

<div class="user-left-menu" style=""> 

<!-- 用户中心导航菜单 -->
{include file="public/left_menu"}
</div>
        <div class="fly-panel fly-panel-user user-right-content" pad20>

<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this">银行卡</li>
  </ul>
  
 
   
           </div>
                     <div class="bank-list">
                        {volist name="list" id="vo"}
                           <li><a href="javascript:;"><img src="__STATIC__/user/images/bank/{$vo.bank_logo}"  style="height:70px"></a>
                           <p>{:bank_replace($vo.card_number)} <span class="layui-badge-rim del" style="margin-top:0px"  data-id="{$vo.id}">取消绑定</span></p>
                           </li>
                           
                         
                        {/volist}
                         <li>
                          <a href="javascript:;" class="layui-btn layui-btn-primary bank-add"><i class="fa fa-plus " aria-hidden="true"></i></a>
                        </li>
                        </div> 
          

           </div>
           </div>
        </div>
        </div>
    
</div>
{include file="public/js"}
<!-- 会员底部文件 -->
{include file="public/footer"}



<script>
layui.use('layer', function(){
  var layer = layui.layer;
  
   $(".bank-add").on("click",function(){

     layer.open({
      type: 2,
      title: false,
      shadeClose:false,
      scrollbar: false,
      skin: 'layui-layer-lan',
      // shade: 0.8,
      area: ['500px', '450px'],
      content: '{:url("Bank/addBank")}' //iframe的url
    }); 
   });


});

$(function(){
  $(".del").on("click",function(){
    var id = $(this).attr("data-id");
    $.post("{:url('Bank/bankdel')}",{"id":id},function(json){
          if(json.code == 0){
             layer.msg(json.msg);
             location.reload();
          }else{
             layer.msg(json.msg);
          }
    });
  });
});
</script>
</body>
</html>